package com.cdh.oa.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * <p>
 * 权限表 权限表
 * </p>
 *
 * @author CDHong
 * @since 2018-11-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_btn")
public class Btn implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 权限名
     */
    @TableField("name")
    private String name;

    /**
     * 权限码
     */
    @TableField("code")
    private String code;

    /**
     * 图标
     */
    @TableField("icon")
    private String icon;

    /**
     * 请求地址
     */
    @TableField("href")
    private String href;

    /**
     * 权限描述
     */
    @TableField("`desc`")
    private String desc;

    /**
     * 操作人编号
     */
    @TableField("create_id")
    private Integer createId;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    public Btn(String name, String code, String icon, String href) {
        this.name = name;
        this.code = code;
        this.icon = icon;
        this.href = href;
    }
}
